package com.example.rocketmq.service;

import com.situ.model.Product;
import com.situ.utils.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "skymall-gateway", contextId = "Product-Feign")
public interface ProductFeignService {
    @GetMapping("/api/v1/products/id/{id}")
    ResponseEntity<JsonResult<Product>> getById(@PathVariable Integer id);

    @PostMapping("/api/v1/products/qty/{productId}/1")
    ResponseEntity<JsonResult<?>>  update(@PathVariable Integer productId);

}
